<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="" method="post" enctype="multipart/form-data">
        <input type="text" name="username">
        <input type="file" name="avator">
        <input type="file" name="zhangsan" multiple>
        <input type="file" name="lisi" multiple>


        <button>提交</button>
    </form>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>

    <script>
        const fele = document.querySelector('form');
        fele.onsubmit = function(e){
            e.preventDefault();
            const fm = new FormData(fele);
            axios.post('/api/users/avator',fm)
            .then(res=>{
                console.log(res.data);
            })
        }
    </script>
</body>
</html>